﻿
using System.Windows.Forms;
using System;

namespace Library.Winform.Draw.Tools {
  public class ToolDrawLine : ToolDraw
  {
    protected static Type ToolDrawLineType = typeof (ToolDrawLine);   
    public ToolDrawLine() {
      Cursor = new Cursor(ToolDrawLineType, "Line.cur");
    }

    #region Overrides of ToolDraw

    protected override ObjectDraw CreateObjectOnMouseDown(IDrawContainer container, ScrollMouseEventArgs e) {
      return new LineDraw(e.X, e.Y, e.X + 1, e.Y + 1);
    }

    protected override ushort PointHandlerOnMouseMove(ScrollMouseEventArgs e) {
      return LineDraw.ToHandle;
    }

    #endregion
  }
}
